package cn.appsys.service.impl.backend_user;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.appsys.dao.backend.BackEnd_LoginMapper;
import cn.appsys.pojo.BackendUser;
import cn.appsys.service.backend_user.BackEnd_LoginService;

@Service("backEnd_LoginService")
public class BackEnd_LoginServiceImpl implements BackEnd_LoginService{
	@Resource(name="backEnd_LoginMapper")
	public BackEnd_LoginMapper backEnd_LoginMapper;
	@Override
	public BackendUser QueryUserByCode(String query_userCode, String query_userPassword) {
		BackendUser backendUser = backEnd_LoginMapper.QueryUserByCode(query_userCode, query_userPassword);
		//判断密码是否匹配
		if (null != backendUser && backendUser.getUserPassword().equals(query_userPassword)) {
			return backendUser;
		}
		return null;
	}
	@Override
	public String GetValueNameById(int id) {
		String ValueName = backEnd_LoginMapper.GetValueNameById(id);
		return ValueName;
	}

}
